<template>
	<view>
		<!-- 用户 -->
		<view class="container1 container" v-if="roles === 2">
			<view class="top">
				<image src="../../static/image/index/adver.png" mode=""></image>
			</view>

			<view class="index">
				<image src="../../static/image/index/balance.png" mode=""></image>
				<view class="balance">
					剩余取液次数：<text class="txt1">{{ margin }} 次</text>
				</view>
			</view>

			<view class="btn_big" @click="appoint">
				<view class="btn_small">
					<view class="bgtime"></view>
					<view class="wenzi" :style="{ color: yuyue === '预约成功' ? '#00FF95' : '#ffffff' }">
						{{yuyue}}
					</view>
				</view>
			</view>
		</view>

		<!-- 门店合伙人 -->
		<view class="container2 container" v-else-if="roles === 6">
			<view class="bigbtn" @click="vipRegister">
				<view class="vip">
					会员注册
				</view>
				<view class="vips">
					MEMBER REGISTRATION
				</view>
			</view>
			<view class="myvip">
				<view class="myvips">
					<view class="vipnum">
						会员数量
						<text>MEMBER</text>
					</view>
					<view class="vipnums">
						本店会员总人数：
						<text>{{vipnum}}</text>
					</view>
				</view>
			</view>
			<view class="bottom_btn">
				<view class="btn_btm" @click="vipsmsg">
					<view class="message btn_logo">
					</view>
					<view class="xinxi">
						会员信息
						<text>MEMBER INFORMATION</text>
					</view>
				</view>
				<view class="btn_btm" @click="erweima">
					<view class="erwema btn_logo">
					</view>
					<view class="xinxi">
						门店二维码
						<text>STORE QR CODE</text>
					</view>
				</view>
			</view>
		</view>

		<!-- 服务合伙人 -->
		<view class="container3 container" v-else-if="roles === 7">
			<view class="work_order">
				<view class="work_orders">
					<view class="remind">
						工单提醒
						<text>WORK ORDER</text>
					</view>
					<view class="remindnum">
						代维护工单数量：
						<text>{{orderNum}}</text>
					</view>
				</view>
			</view>
			<view class="work_table">
				<view class="table_top">
					<view class="box" @click="ordermsg">
						<image src="/static/image/users/index_serve/2.png" mode=""></image>
						<view class="boxtxt">
							工单信息
							<text>WORK ORDER INFORMOTION</text>
						</view>
					</view>
					<view class="box" @click="repairs">
						<image src="/static/image/users/index_serve/3.png" mode=""></image>
						<view class="boxtxt">
							报修信息
							<text>REPAIR INFORMOTION</text>
						</view>
					</view>
				</view>
				<view class="table_top">
					<view class="box" @click="vipMessage">
						<image src="/static/image/users/index_serve/4.png" mode=""></image>
						<view class="boxtxt">
							门店信息
							<text>STORE INFORMOTION</text>
						</view>
					</view>
					<view class="box" @click="server">
						<image src="/static/image/users/index_serve/4.png" mode=""></image>
						<view class="boxtxt">
							服务记录
							<text>SERVICE RECORD</text>
						</view>
					</view>
				</view>
			</view>
		</view>

		<!-- 业务合伙人 -->
		<view class="container4 container" v-else-if="roles == 5">
			<view class="bigbtn" @click="mdSign">
				<view class="vip">
					门店签约
				</view>
				<view class="vips">
					STORE SIGNING
				</view>
			</view>
			<view class="myvip">
				<view class="myvip_img">
					<image src="../../static/image/business/3-2.png" mode=""></image>
				</view>
				<view class="myvips">
					<view class="vipnum">
						日累计收入(元)
						<text>{{dayincome}}</text>
					</view>
					<view class="vipnums">
						月累计收入(元)
						<text>{{monthincome}}</text>
					</view>
				</view>
			</view>
			<view class="bottom_btn">
				<view class="btn_btm" @click="vipMessage">
					<view class="btn_center">
						<view class="message btn_logo">
						</view>
						<view class="xinxi">
							门店信息
							<text>STORE INFORMATION</text>
						</view>
					</view>
				</view>
				<view class="btn_btm" @click="bill">
					<view class="btn_center">
						<view class="bill btn_logo">
						</view>
						<view class="xinxi">
							对&nbsp;&nbsp;&nbsp;账
							<text>RECONCILIATION</text>
						</view>
					</view>
				</view>
			</view>
			<view class="bottom_btn">
				<view class="btn_btm" @click="loadinvoice">
					<view class="btn_center btn_centers">
						<view class="load btn_logo">
						</view>
						<view class="xinxi xinxis">
							上传发票
							<text>UPLOAD INVOICE</text>
						</view>
					</view>
				</view>
				<view class="btn_btm" @click="proceeds">
					<view class="btn_center">
						<view class="confim btn_logo">
						</view>
						<view class="xinxi">
							确认收款
							<text>CONFIRM RECEIPT</text>
						</view>
					</view>
				</view>
			</view>
		</view>

		<!-- 城市合伙人 -->
		<view class="container5 container" v-else-if="roles == 4">
			<view class="city_top">
				<view class="city_income">
					<view class="cityday">
						<text class="day1">日累计收入（元）</text>
						<text class="day2">{{income.dayIncome}}</text>
					</view>
					<view class="xian">
					</view>
					<view class="cityyear">
						<text class="day1">月累计收入（元）</text>
						<text class="day2">{{income.monthIncome}}</text>
					</view>
				</view>
			</view>
			<view class="city_center">
				<view class="citynum">
					<text class="num">已安装数量(台)</text>
					<text class="nums">{{income.deviceInstall}}</text>
				</view>
				<view class="citynum">
					<text class="num num_F">设备总数(台)</text>
					<text class="nums nums2">{{income.deviceTotal}}</text>
				</view>
			</view>

			<view class="city_table">
				<view class="tab-a">
					<view class="tab" @click="vipMessage">
						<view class="cityphoto">
							<image src="../../static/image/business/4.png" mode=""></image>
						</view>
						<view class="message">
							<text class="mesg">门店信息</text>
							<text class="mesg2">STORE INFORMATION</text>
						</view>
					</view>
					<view class="tab" @click="bill">
						<view class="cityphoto">
							<image src="../../static/image/business/4.png" mode=""></image>
						</view>
						<view class="message">
							<text class="mesg interval">对账</text>
							<text class="mesg2">RECONCILIATION</text>
						</view>
					</view>
				</view>
				<view class="tab-a">
					<view class="tab" @click="loadinvoice">
						<view class="cityphoto">
							<image src="../../static/image/business/4.png" mode=""></image>
						</view>
						<view class="message">
							<text class="mesg">上传发票</text>
							<text class="mesg2">UPLOAD INVOICE</text>
						</view>
					</view>
					<view class="tab" @click="proceeds">
						<view class="cityphoto">
							<image src="../../static/image/business/4.png" mode=""></image>
						</view>
						<view class="message">
							<text class="mesg">确认收款</text>
							<text class="mesg2">CONFIRM RECEIPT</text>
						</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 事业合伙人 -->
		<view class="container6 container" v-else-if="roles == 3">
			<view class="cause_top">
				<view class="cause_income">
					<view class="causeday">
						<text class="day1">日累计收入（元）</text>
						<text class="day2">1386</text>
					</view>
					<view class="xian">
					</view>
					<view class="causeyear">
						<text class="day1">月累计收入（元）</text>
						<text class="day2">24000</text>
					</view>
				</view>
			</view>

			<view class="cause_table">
				<view class="cause-a" @click="bill">
					<view class="tab tabcom">
					</view>
					<view class="tab1">
						对账
					</view>
				</view>
				<view class="cause-a" @click="loadinvoice">
					<view class="tab tabcom">
					</view>
					<view class="tab1">
						上传发票
					</view>
				</view>
				<view class="cause-a" @click="proceeds">
					<view class="tab tabcom">
					</view>
					<view class="tab1">
						确认收款
					</view>
				</view>
			</view>
			<view class="causemessage">
				<view class="causemage" @click="investormsg">
					<view class="causephoto">
						<image src="../../static/image/cause/6.png" mode=""></image>
					</view>
					<view class="cause-czr">
						<text class="czr">出资人信息</text>
						<text class="czr1">INVESTOR INFORMATION</text>
					</view>
				</view>
				<view class="causemage" @click="vipMessage">
					<view class="causephoto">
						<image src="../../static/image/cause/7.png" mode=""></image>
					</view>
					<view class="cause-czr">
						<text class="czr">门店信息</text>
						<text class="czr1">STORE INFORMATION</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		index_users
	} from '@/common/mixins/index/index_users.js'
	import {
		index_store
	} from '@/common/mixins/index/index_store.js'

	import {
		index_city
	} from '@/common/mixins/index/index_city.js'

	import {
		index_business
	} from '@/common/mixins/index/index_business.js'
	import {
		index_service
	} from '@/common/mixins/index/index_service.js'
	export default {
		mixins: [index_users, index_store, index_city, index_business, index_service],
		methods: {

			//用户


			// 门店合伙人(门店信息)
			vipMessage() {
				uni.navigateTo({
					url: "/pages/cause/shopmsg/index"
				})
			},

			// 会员信息
			vipsmsg() {
				uni.navigateTo({
					url: "/pages/store/vipMessage/index"
				})
			},

			// 门店合伙人
			vipRegister() {
				uni.navigateTo({
					url: "/pages/store/vipregister/index"
				})
			},

			erweima() {
				uni.navigateTo({
					url: "/pages/store/erweima/index"
				})
			},

			// 门店签约（业务合伙人）
			mdSign() {
				uni.navigateTo({
					url: "/pages/business/mdsign/index"
				})
			},
			// 上传发票（业务合伙人）
			loadinvoice() {
				uni.navigateTo({
					url: '/pages/business/invoice/index'
				})
			},
			// 确认收款（业务合伙人）
			proceeds() {
				uni.navigateTo({
					url: '/pages/business/collection/index'
				})
			},
			// 对账（业务合伙人）
			bill() {
				uni.navigateTo({
					url: '/pages/business/account/index'
				})
			},


			// 服务合伙人工单信息
			ordermsg() {
				uni.navigateTo({
					url: '/pages/server/ordernsg/index'
				})
			},
			//服务合伙人报修信息
			repairs() {
				uni.navigateTo({
					url: "/pages/server/repairsmsg/index"
				})
			},

			// 服务合伙人服务记录
			server() {
				uni.navigateTo({
					url: "/pages/server/servicelog/index"
				})
			},

			// 事业合伙人（出资人信息）
			investormsg() {
				uni.navigateTo({
					url: "/pages/cause/contributor/index"
				})
			}


		}
	}
</script>

<!-- 1的css -->
<style scoped lang="scss">
	@import '@/common/sass/all/all.scss';
	@import '@/common/sass/index/index.scss';
	@import '@/common/sass/index/index_user.scss';
	@import '@/common/sass/index/index_serve.scss';
	@import '@/common/sass/index/index_business.scss';
	@import '@/common/sass/index/index_city.scss';
	@import '@/common/sass/index/index_cause.scss';
</style>